package main

import (
	"net/http"
	"os"
	"github.com/yfsoftcom/video-share/controllers"
	mux "github.com/gorilla/mux"
)
var (
	
	local = os.Getenv("LOCAL_DIR_HOME")
)

func main() {

	http.Handle("/static/", http.StripPrefix("/static/",http.FileServer(http.Dir(local))))	
	http.Handle("/public/", http.StripPrefix("/public/",http.FileServer(http.Dir("./public"))))

	r := mux.NewRouter()

  	r.HandleFunc("/login", LoginHandler )
	// r.HandleFunc("/logout", c.LogoutHandler )
	// r.HandleFunc("/item", c.ItemHandler )
	// r.HandleFunc("/detail", c.DetailHandler )
	// r.HandleFunc("/preview", c.AuthOn(c.PreviewHandler) )
	// // http.HandleFunc("/scan", ScanHandler )
	// r.HandleFunc("/", c.AuthOn(c.ListHandler) )

	http.Handle("/", r)
  	http.ListenAndServe("0.0.0.0:8000", nil)
}